<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>准备</title>
    <meta name="generator" content="VuePress 1.9.9">
    <link href="https://cdn.jsdelivr.net/npm/@docsearch/css@alpha" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/@docsearch/js@alpha"></script>
    <meta name="description" content="">
    
    <link rel="preload" href="/my-note/assets/css/0.styles.6007a078.css" as="style"><link rel="preload" href="/my-note/assets/js/app.57cc677e.js" as="script"><link rel="preload" href="/my-note/assets/js/4.e47306be.js" as="script"><link rel="preload" href="/my-note/assets/js/1.48f7700a.js" as="script"><link rel="preload" href="/my-note/assets/js/8.b0ccbd7f.js" as="script"><link rel="prefetch" href="/my-note/assets/js/10.46acd53e.js"><link rel="prefetch" href="/my-note/assets/js/11.fe88a43b.js"><link rel="prefetch" href="/my-note/assets/js/12.48f4874d.js"><link rel="prefetch" href="/my-note/assets/js/13.23aed4ea.js"><link rel="prefetch" href="/my-note/assets/js/14.df97c0c0.js"><link rel="prefetch" href="/my-note/assets/js/15.f24e80d9.js"><link rel="prefetch" href="/my-note/assets/js/16.d95b4dc2.js"><link rel="prefetch" href="/my-note/assets/js/17.75e0c72c.js"><link rel="prefetch" href="/my-note/assets/js/18.c3530f0f.js"><link rel="prefetch" href="/my-note/assets/js/19.7e2b6798.js"><link rel="prefetch" href="/my-note/assets/js/20.2c5cc0c8.js"><link rel="prefetch" href="/my-note/assets/js/21.cdd9522e.js"><link rel="prefetch" href="/my-note/assets/js/22.d092f66f.js"><link rel="prefetch" href="/my-note/assets/js/23.0c445dc8.js"><link rel="prefetch" href="/my-note/assets/js/24.955d42c4.js"><link rel="prefetch" href="/my-note/assets/js/25.bc3fab3a.js"><link rel="prefetch" href="/my-note/assets/js/26.fdb157a6.js"><link rel="prefetch" href="/my-note/assets/js/27.8dd07a3b.js"><link rel="prefetch" href="/my-note/assets/js/28.38ca7c9c.js"><link rel="prefetch" href="/my-note/assets/js/29.e9495e42.js"><link rel="prefetch" href="/my-note/assets/js/3.04dff26a.js"><link rel="prefetch" href="/my-note/assets/js/30.adee5af1.js"><link rel="prefetch" href="/my-note/assets/js/31.da43303d.js"><link rel="prefetch" href="/my-note/assets/js/32.9aed0f05.js"><link rel="prefetch" href="/my-note/assets/js/33.827d2ad3.js"><link rel="prefetch" href="/my-note/assets/js/34.fca2e8d8.js"><link rel="prefetch" href="/my-note/assets/js/5.7044c00d.js"><link rel="prefetch" href="/my-note/assets/js/6.2d88e74d.js"><link rel="prefetch" href="/my-note/assets/js/7.bbf0a4a6.js"><link rel="prefetch" href="/my-note/assets/js/9.f3dabe1a.js">
    <link rel="stylesheet" href="/my-note/assets/css/0.styles.6007a078.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-7dd95ae2><div data-v-7dd95ae2><div class="password-shadow password-wrapper-out" style="display:none;" data-v-59e6cb88 data-v-7dd95ae2 data-v-7dd95ae2><h3 class="title" data-v-59e6cb88></h3> <p class="description" data-v-59e6cb88></p> <label id="box" class="inputBox" data-v-59e6cb88><input type="password" value="" data-v-59e6cb88> <span data-v-59e6cb88>Konck! Knock!</span> <button data-v-59e6cb88>OK</button></label> <div class="footer" data-v-59e6cb88><span data-v-59e6cb88><i class="iconfont reco-theme" data-v-59e6cb88></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-59e6cb88>vuePress-theme-reco</a></span> <span data-v-59e6cb88><i class="iconfont reco-copyright" data-v-59e6cb88></i> <a data-v-59e6cb88><!---->
          
        <!---->
        2023
      </a></span></div></div> <div class="hide" data-v-7dd95ae2><header class="navbar" data-v-7dd95ae2><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/my-note/" class="home-link router-link-active"></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/my-note/" class="nav-link"><i class="undefined"></i>
  Home
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="undefined"></i>
      Code
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my-note/code/vuepress-first/" class="nav-link"><i class="undefined"></i>
  vuepress-first
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/github-gitee/" class="nav-link"><i class="undefined"></i>
  github-gitee
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/create-ssh-key-github-to-gitee/" class="nav-link"><i class="undefined"></i>
  create-ssh-key-github-to-gitee
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/Algolia-full-search/" class="nav-link"><i class="undefined"></i>
  Algolia-full-search
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/dependencies-inject/" class="nav-link"><i class="undefined"></i>
  dependencies-inject
</a></li><li class="dropdown-item"><!----> <a href="/my-note/project/email/" class="nav-link"><i class="undefined"></i>
  project
</a></li></ul></div></div><div class="nav-item"><a href="/my-note/life/" class="nav-link"><i class="undefined"></i>
  Life
</a></div><div class="nav-item"><a href="/my-note/Car/" class="nav-link"><i class="undefined"></i>
  Car
</a></div><div class="nav-item"><a href="/my-note/note/" class="nav-link"><i class="undefined"></i>
  Note
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="undefined"></i>
      pa-note
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my-note/pa-note/1-env/" class="nav-link"><i class="undefined"></i>
  1-env
</a></li><li class="dropdown-item"><!----> <a href="/my-note/pa-note/2-env/" class="nav-link"><i class="undefined"></i>
  2-env
</a></li><li class="dropdown-item"><!----> <a href="/my-note/pa-note/3-pa-env/" class="nav-link"><i class="undefined"></i>
  3-pa-env
</a></li></ul></div></div><div class="nav-item"><a href="/my-note/problem/" class="nav-link"><i class="undefined"></i>
  Problem
</a></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-7dd95ae2></div> <aside class="sidebar" data-v-7dd95ae2><div class="personal-info-wrapper" data-v-1fad0c41 data-v-7dd95ae2><!----> <!----> <div class="num" data-v-1fad0c41><div data-v-1fad0c41><h3 data-v-1fad0c41>20</h3> <h6 data-v-1fad0c41>Articles</h6></div> <div data-v-1fad0c41><h3 data-v-1fad0c41>0</h3> <h6 data-v-1fad0c41>Tags</h6></div></div> <ul class="social-links" data-v-1fad0c41></ul> <hr data-v-1fad0c41></div> <nav class="nav-links"><div class="nav-item"><a href="/my-note/" class="nav-link"><i class="undefined"></i>
  Home
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="undefined"></i>
      Code
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my-note/code/vuepress-first/" class="nav-link"><i class="undefined"></i>
  vuepress-first
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/github-gitee/" class="nav-link"><i class="undefined"></i>
  github-gitee
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/create-ssh-key-github-to-gitee/" class="nav-link"><i class="undefined"></i>
  create-ssh-key-github-to-gitee
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/Algolia-full-search/" class="nav-link"><i class="undefined"></i>
  Algolia-full-search
</a></li><li class="dropdown-item"><!----> <a href="/my-note/code/dependencies-inject/" class="nav-link"><i class="undefined"></i>
  dependencies-inject
</a></li><li class="dropdown-item"><!----> <a href="/my-note/project/email/" class="nav-link"><i class="undefined"></i>
  project
</a></li></ul></div></div><div class="nav-item"><a href="/my-note/life/" class="nav-link"><i class="undefined"></i>
  Life
</a></div><div class="nav-item"><a href="/my-note/Car/" class="nav-link"><i class="undefined"></i>
  Car
</a></div><div class="nav-item"><a href="/my-note/note/" class="nav-link"><i class="undefined"></i>
  Note
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="undefined"></i>
      pa-note
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my-note/pa-note/1-env/" class="nav-link"><i class="undefined"></i>
  1-env
</a></li><li class="dropdown-item"><!----> <a href="/my-note/pa-note/2-env/" class="nav-link"><i class="undefined"></i>
  2-env
</a></li><li class="dropdown-item"><!----> <a href="/my-note/pa-note/3-pa-env/" class="nav-link"><i class="undefined"></i>
  3-pa-env
</a></li></ul></div></div><div class="nav-item"><a href="/my-note/problem/" class="nav-link"><i class="undefined"></i>
  Problem
</a></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-59e6cb88 data-v-7dd95ae2><h3 class="title" data-v-59e6cb88></h3> <!----> <label id="box" class="inputBox" data-v-59e6cb88><input type="password" value="" data-v-59e6cb88> <span data-v-59e6cb88>Konck! Knock!</span> <button data-v-59e6cb88>OK</button></label> <div class="footer" data-v-59e6cb88><span data-v-59e6cb88><i class="iconfont reco-theme" data-v-59e6cb88></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-59e6cb88>vuePress-theme-reco</a></span> <span data-v-59e6cb88><i class="iconfont reco-copyright" data-v-59e6cb88></i> <a data-v-59e6cb88><!---->
          
        <!---->
        2023
      </a></span></div></div> <div data-v-7dd95ae2><div data-v-7dd95ae2><main class="page"><section style="display:;"><div class="page-title"><h1 class="title">准备</h1> <div data-v-8a445198><!----> <!----> <i class="iconfont reco-eye" data-v-8a445198><span id="/my-note/code/vuepress-first.html" data-flag-title="Your Article Title" class="leancloud-visitors" data-v-8a445198><a class="leancloud-visitors-count" style="font-size:.9rem;font-weight:normal;color:#999;"></a></span></i> <!----></div></div> <div class="theme-reco-content content__default"><h1 id="准备"><a href="#准备" class="header-anchor">#</a> 准备</h1> <p>运行环境：windows11</p> <h2 id="nvm、node、npm的概念"><a href="#nvm、node、npm的概念" class="header-anchor">#</a> nvm、node、npm的概念</h2> <ul><li>nvm：nodejs 版本管理工具，一个 nvm 可以管理很多 node 版本和 npm 版本。</li> <li>nodejs：在项目开发时的所需要的代码库</li> <li>npm：nodejs 包管理工具，在安装的 nodejs 的时候，npm 也会跟着一起安装，它是<strong>包管理工具</strong>，npm 管理 nodejs 中的第三方插件。</li></ul> <h2 id="nvm-安装"><a href="#nvm-安装" class="header-anchor">#</a> nvm 安装</h2> <h3 id="官网"><a href="#官网" class="header-anchor">#</a> 官网</h3> <p><a href="https://github.com/nvm-sh/nvm/blob/master/README.md" target="_blank" rel="noopener noreferrer">Node Version Manager<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <h3 id="下载"><a href="#下载" class="header-anchor">#</a> 下载</h3> <p><a href="https://github.com/coreybutler/nvm-windows/releases" target="_blank" rel="noopener noreferrer">https://github.com/coreybutler/nvm-windows/releases<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p><img src="/my-note/assets/img/nvm-setup.38b10ebd.png" alt="nvm-setup.exe" title="nvm-setup.exe"></p> <h4 id="安装步骤-设置路径-一直点击next"><a href="#安装步骤-设置路径-一直点击next" class="header-anchor">#</a> 安装步骤，设置路径，一直点击next</h4> <p><img src="/my-note/assets/img/install-1.24f5f7de.png" alt="install-1" title="install-1"></p> <p><img src="/my-note/assets/img/install-2.f48a72ff.png" alt="install-2" title="install-2"></p> <p><img src="/my-note/assets/img/install-3.57fb5dd2.png" alt="install-3" title="install-3"></p> <p><img src="/my-note/assets/img/install-4.eb87d631.png" alt="install-4" title="install-4"></p> <h3 id="环境变量"><a href="#环境变量" class="header-anchor">#</a> 环境变量</h3> <ul><li>安装完之后环境变量会自动配置</li></ul> <p><img src="/my-note/assets/img/env-1.450ffddd.png" alt="env-1.png"></p> <p><img src="/my-note/assets/img/env-2.68e49c66.png" alt="env-2.png"></p> <h3 id="配置淘宝镜像"><a href="#配置淘宝镜像" class="header-anchor">#</a> 配置淘宝镜像</h3> <ul><li>找到nvm安装目录下的settings.txt，加入以下命令：
<ul><li>nvm node_mirror <a href="http://npm.taobao.org/mirrors/node/" target="_blank" rel="noopener noreferrer">http://npm.taobao.org/mirrors/node/<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li> <li>nvm npm_mirror <a href="http://npm.taobao.org/mirrors/npm/" target="_blank" rel="noopener noreferrer">http://npm.taobao.org/mirrors/npm/<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></li></ul> <p><img src="" alt="addImage.png"></p> <h3 id="基本命令"><a href="#基本命令" class="header-anchor">#</a> 基本命令</h3> <div class="language- line-numbers-mode"><pre class="language-text"><code>nvm arch：表⽰node是运⾏在32位还是64位。

nvm on ：开启node.js版本管理。

nvm off：关闭node.js版本管理。

nvm list [available]：查看已安装的node版本。available可选参数，查看所有可安装的node版本。list可简化成ls。

nvm install [version]：安装指定的node版本。

nvm use [version] [arch]：使⽤指定版本的node。可指定32位或64位。

nvm uninstall : 卸载指定版本的node。

nvm version：查看nvm版本号。version可简化为v。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h2 id="nodejs-安装"><a href="#nodejs-安装" class="header-anchor">#</a> nodejs 安装</h2> <h3 id="查看本地-nodejs-版本"><a href="#查看本地-nodejs-版本" class="header-anchor">#</a> 查看本地 nodejs 版本</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>nvm <span class="token function">ls</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><img src="" alt="nvm-ls.png"></p> <h3 id="查找-nodejs-版本"><a href="#查找-nodejs-版本" class="header-anchor">#</a> 查找 nodejs 版本</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>nvm list available 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><img src="/my-note/assets/img/nvm-list-available.084bf920.png" alt="nvm-list-available.png"></p> <h3 id="安装指定版本的-nodejs"><a href="#安装指定版本的-nodejs" class="header-anchor">#</a> 安装指定版本的 nodejs</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>nvm <span class="token function">install</span> 版本号

nvm <span class="token function">install</span> <span class="token number">16.20</span>.0
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="切换-nodejs-版本"><a href="#切换-nodejs-版本" class="header-anchor">#</a> 切换 nodejs 版本</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>nvm use 版本号  

nvm use <span class="token number">16.20</span>.0
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="查看-nodejs-版本"><a href="#查看-nodejs-版本" class="header-anchor">#</a> 查看 nodejs 版本</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">node</span> <span class="token parameter variable">-v</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="npm-安装"><a href="#npm-安装" class="header-anchor">#</a> npm 安装</h2> <p>安装npm淘宝镜像：npm config set registry https://registry.npm.taobao.org</p> <h3 id="查看-npm-版本"><a href="#查看-npm-版本" class="header-anchor">#</a> 查看 npm 版本</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">npm</span> <span class="token parameter variable">-v</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="yarn-安装"><a href="#yarn-安装" class="header-anchor">#</a> yarn 安装</h2> <p>全局安装 yarn</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>npm install -g yarn
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h1 id="vuepress-快速上手"><a href="#vuepress-快速上手" class="header-anchor">#</a> VuePress 快速上手</h1> <p>VuePress 1.x
<a href="https://vuepress.vuejs.org/zh/guide/getting-started.html" target="_blank" rel="noopener noreferrer">https://vuepress.vuejs.org/zh/guide/getting-started.html<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>
<span class="token function">mkdir</span> vuepress-starter 
 
<span class="token builtin class-name">cd</span> vuepress-starter

<span class="token function">yarn</span> init <span class="token comment"># npm init</span>

<span class="token function">yarn</span> <span class="token function">add</span> <span class="token parameter variable">-D</span> vuepress

<span class="token function">mkdir</span> docs 

<span class="token builtin class-name">echo</span> <span class="token string">'# Hello VuePress'</span> <span class="token operator">&gt;</span> docs/README.md


</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h3 id="在-package-json-添加一下配置"><a href="#在-package-json-添加一下配置" class="header-anchor">#</a> 在 package.json 添加一下配置</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token punctuation">{</span>
  <span class="token string">&quot;scripts&quot;</span><span class="token builtin class-name">:</span> <span class="token punctuation">{</span>
    <span class="token string">&quot;docs:dev&quot;</span><span class="token builtin class-name">:</span> <span class="token string">&quot;vuepress dev docs&quot;</span>,
    <span class="token string">&quot;docs:build&quot;</span><span class="token builtin class-name">:</span> <span class="token string">&quot;vuepress build docs&quot;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h3 id="在本地启动服务器"><a href="#在本地启动服务器" class="header-anchor">#</a> 在本地启动服务器</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>
<span class="token function">yarn</span> docs:dev <span class="token comment"># npm run docs:dev</span>

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h2 id="参考"><a href="#参考" class="header-anchor">#</a> 参考</h2> <p><a href="https://juejin.cn/post/7093787595951308836" target="_blank" rel="noopener noreferrer">https://juejin.cn/post/7093787595951308836<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p><a href="https://vuepress.vuejs.org/zh/guide/getting-started.html" target="_blank" rel="noopener noreferrer">https://vuepress.vuejs.org/zh/guide/getting-started.html<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></div></section> <footer class="page-edit"><!----> <!----></footer> <!----> <div class="comments-wrapper"><!----></div></main></div> <!----></div> <ul class="sub-sidebar sub-sidebar-wrapper" style="width:12rem;" data-v-b57cc07c data-v-7dd95ae2><li class="level-2" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#nvm、node、npm的概念" class="sidebar-link reco-side-nvm、node、npm的概念" data-v-b57cc07c>nvm、node、npm的概念</a></li><li class="level-2" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#nvm-安装" class="sidebar-link reco-side-nvm-安装" data-v-b57cc07c>nvm 安装</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#官网" class="sidebar-link reco-side-官网" data-v-b57cc07c>官网</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#下载" class="sidebar-link reco-side-下载" data-v-b57cc07c>下载</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#环境变量" class="sidebar-link reco-side-环境变量" data-v-b57cc07c>环境变量</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#配置淘宝镜像" class="sidebar-link reco-side-配置淘宝镜像" data-v-b57cc07c>配置淘宝镜像</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#基本命令" class="sidebar-link reco-side-基本命令" data-v-b57cc07c>基本命令</a></li><li class="level-2" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#nodejs-安装" class="sidebar-link reco-side-nodejs-安装" data-v-b57cc07c>nodejs 安装</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#查看本地-nodejs-版本" class="sidebar-link reco-side-查看本地-nodejs-版本" data-v-b57cc07c>查看本地 nodejs 版本</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#查找-nodejs-版本" class="sidebar-link reco-side-查找-nodejs-版本" data-v-b57cc07c>查找 nodejs 版本</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#安装指定版本的-nodejs" class="sidebar-link reco-side-安装指定版本的-nodejs" data-v-b57cc07c>安装指定版本的 nodejs</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#切换-nodejs-版本" class="sidebar-link reco-side-切换-nodejs-版本" data-v-b57cc07c>切换 nodejs 版本</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#查看-nodejs-版本" class="sidebar-link reco-side-查看-nodejs-版本" data-v-b57cc07c>查看 nodejs 版本</a></li><li class="level-2" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#npm-安装" class="sidebar-link reco-side-npm-安装" data-v-b57cc07c>npm 安装</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#查看-npm-版本" class="sidebar-link reco-side-查看-npm-版本" data-v-b57cc07c>查看 npm 版本</a></li><li class="level-2" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#yarn-安装" class="sidebar-link reco-side-yarn-安装" data-v-b57cc07c>yarn 安装</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#在-package-json-添加一下配置" class="sidebar-link reco-side-在-package-json-添加一下配置" data-v-b57cc07c>在 package.json 添加一下配置</a></li><li class="level-3" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#在本地启动服务器" class="sidebar-link reco-side-在本地启动服务器" data-v-b57cc07c>在本地启动服务器</a></li><li class="level-2" data-v-b57cc07c><a href="/my-note/code/vuepress-first.html#参考" class="sidebar-link reco-side-参考" data-v-b57cc07c>参考</a></li></ul></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div></div></div>
    <script src="/my-note/assets/js/app.57cc677e.js" defer></script><script src="/my-note/assets/js/4.e47306be.js" defer></script><script src="/my-note/assets/js/1.48f7700a.js" defer></script><script src="/my-note/assets/js/8.b0ccbd7f.js" defer></script>
  </body>
</html>
